unit User_LogsQuery;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, BaseDialog, StdCtrls, Buttons, ComCtrls, cxGraphics,
  cxLookAndFeels, cxLookAndFeelPainters, Menus, ExtCtrls, cxButtons;

type
  TFrmUser_LogsQuery = class(TfrmBaseDialog)
    ChkUserID: TCheckBox;
    ChkUserName: TCheckBox;
    ChkLogIp: TCheckBox;
    ChkLogComputer: TCheckBox;
    ChkLogInTime: TCheckBox;
    ChkLogOutTime: TCheckBox;
    EdtUserID: TEdit;
    EdtUserName: TEdit;
    EdtLogIP: TEdit;
    EdtLogComputer: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    DtpLogInTimeB: TDateTimePicker;
    DtpLogOutTimeB: TDateTimePicker;
    DtpLogOutTimeE: TDateTimePicker;
    DtpLogInTimeE: TDateTimePicker;
    procedure ChkUserIDClick(Sender: TObject);
    procedure ChkUserNameClick(Sender: TObject);
    procedure ChkLogIpClick(Sender: TObject);
    procedure ChkLogComputerClick(Sender: TObject);
    procedure ChkLogInTimeClick(Sender: TObject);
    procedure ChkLogOutTimeClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FrmUser_LogsQuery: TFrmUser_LogsQuery;

implementation

{$R *.dfm}

procedure TFrmUser_LogsQuery.ChkUserIDClick(Sender: TObject);
begin
  inherited;
  EdtUserID.Enabled := ChkUserID.Checked;
  if ChkUserID.Checked then
    EdtUserID.Color := clWindow
  else
    EdtUserID.Color := clScrollBar;
end;

procedure TFrmUser_LogsQuery.ChkUserNameClick(Sender: TObject);
begin
  inherited;
  EdtUserName.Enabled := ChkUserName.Checked;
  if ChkUserName.Checked then
    EdtUserName.Color := clWindow
  else
    EdtUserName.Color := clScrollBar;
end;

procedure TFrmUser_LogsQuery.ChkLogIpClick(Sender: TObject);
begin
  inherited;
  EdtLogIP.Enabled := ChkLogIp.Checked;
  if ChkLogIp.Checked then
    EdtLogIP.Color := clWindow
  else
    EdtLogIP.Color := clScrollBar;
end;

procedure TFrmUser_LogsQuery.ChkLogComputerClick(Sender: TObject);
begin
  inherited;
  EdtLogComputer.Enabled := ChkLogComputer.Checked;
  if ChkLogComputer.Checked then
    EdtLogComputer.Color := clWindow
  else
    EdtLogComputer.Color := clScrollBar;
end;

procedure TFrmUser_LogsQuery.ChkLogInTimeClick(Sender: TObject);
begin
  inherited;
  DtpLogInTimeB.Enabled := ChkLogInTime.Checked;
  DtpLogInTimeE.Enabled := ChkLogInTime.Checked;
  if ChkLogInTime.Checked then
  begin
    DtpLogInTimeB.Color := clWindow;
    DtpLogInTimeE.Color := clWindow;
  end
  else
  begin
    DtpLogInTimeB.Color := clScrollBar;
    DtpLogInTimeE.Color := clScrollBar;
  end;
end;

procedure TFrmUser_LogsQuery.ChkLogOutTimeClick(Sender: TObject);
begin
  inherited;
  DtpLogoutTimeB.Enabled := ChkLogoutTime.Checked;
  DtpLogoutTimeE.Enabled := ChkLogoutTime.Checked;
  if ChkLogoutTime.Checked then
  begin
    DtpLogoutTimeB.Color := clWindow;
    DtpLogoutTimeE.Color := clWindow;
  end
  else
  begin
    DtpLogoutTimeB.Color := clScrollBar;
    DtpLogoutTimeE.Color := clScrollBar;
  end;
end;

end.

